package com.xunlai.infra.permission.business.dao.repository;

import com.xunlai.infra.permission.business.dao.entity.PhotoGallery;
import com.xunlai.infra.permission.storage.repository.BaseAllRoundRepository;
import org.springframework.data.jdbc.repository.query.Modifying;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liang
 * @date 8/7/23 7:21 PM
 */
@Transactional(rollbackFor = Exception.class)
public interface PhotoGalleryRepository extends BaseAllRoundRepository<PhotoGallery,Long> {

    @Query("delete from travel_photo_gallery where create_user = :createUser and id = :id")
    @Modifying
    void deleteByCreateUserAndId(@Param("createUser") Long createUser,@Param("id") Long id);
}
